package vno.fux.utils
{
	import flash.events.Event;
	import flash.events.EventDispatcher;

	public class Mission
	{
		protected var _completeEvent:String;
		protected var _progressEvent:String;
		private var _closure:Function;
		private var _params:Object;
		private var _listener:EventDispatcher;
		private var _id:uint;
		private var _name:String;
		private var _weight:uint;
		public function Mission(closure_:Function, params_:Object, listener_:EventDispatcher, 
			progressEvent_:String, completeEvent_:String, missionName_:String = "", weight_:uint=1)
		{
			_closure	= closure_;
			_params		= params_;
			_listener	= listener_;
			_name		= missionName_;
			_weight		= weight_;
			_completeEvent	= completeEvent_;
			_progressEvent = progressEvent_;
		}
		public function get closure():Function
		{
			return _closure;
		}

		public function get params():Object
		{
			return _params;
		}

		public function get listener():EventDispatcher
		{
			return _listener;
		}

		public function get completeEvent():String
		{
			return _completeEvent;
		}
		public function get progressEvent():String
		{
			return _progressEvent;
		}
		public function get id():uint
		{
			return _id;
		}
		public function set id(value:uint):void
		{
			_id = value;
		}
		public function get weight():uint
		{
			return _weight;
		}
		public function toString():String
		{
			return "missionid:"+_id+"; \t|name:"+_name+"; \t|listener:"+_listener+"; \t|event:"+_completeEvent;
		}


	}
}